package com.dhu719.label_end.service;

import com.dhu719.label_end.domain.User;
import com.dhu719.label_end.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>Title: $file.className</p>
 * <p>Description: </p>
 *
 * @author Kaboon
 * @date
 */
@Service
public class UserService{
    @Autowired
    private UserMapper userMapper;

    public User checkLogin(String username, String password) {
        return userMapper.checkLogin(username,password);
    }

    public String AddUser(User user){
        if (userMapper.insert(user) == 1){
            return "success";
        }
        else    return "false";
    }
}
